# Python 2.6.4
# Project Euler, Problem 29
# Copyright 2010 Talha Zaman

powers = []
for i in range(2,101):
    for j in range(2,101):
        if i**j not in powers: powers.append(i**j)
print len(powers)
